/* algorithm for a graph */
/* author:nemo(nemokingdom@gmail.com) */
/* date:Apr. 14th,2008 */

#include <stdio.h>
#include <stdlib.h>
#include <string.h>


#ifndef __GRAPH
#define __GRAPH

#define MAXVERTEX 10
#define MAXLEN 10
#define QSIZE 100
#define MAXEDGE 50


typedef enum {FALSE, TRUE
}boolean;


typedef struct Edge
{
   int vertex;
   int weight;
   struct Edge *next;
}Edge;

typedef struct Vertex
{
   char *name;
   Edge *edge;
}Vertex;

typedef struct Graph
{
   Vertex vtab[MAXVERTEX];
   int v_num;
   int e_num;
}Graph;

typedef struct Queue
{
   int current;
   int end;
   int q[QSIZE];
}Queue;


typedef struct PriorityQueue
{
   int len;
   int q[QSIZE];
}PQueue;

typedef struct EdgeInfo
{
   int from;
   int to;
   int weight;
}EdgeInfo;



#endif
